<?php
namespace app\index\controller;
use app\common\controller\Common;
/*
*基类
*/
class Base extends Common
{	
	protected function _initialize()
    {
    	if(!session('userid')){
    		if(!cookie('userid')){
    			$this->redirect("login/index");
    		}else{
    			session('userid',cookie('userid'));
    		}
			
    	}
    	var_dump(cookie('userid'));
    }
	//默认首页
	public function index()
	{	
		return $this->fetch();
	}

}